package Admin;


public class AccountView extends javax.swing.JDialog {


    public AccountView(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
    }

    @SuppressWarnings("unchecked")

    private void initComponents() {

        lbloginname = new javax.swing.JLabel();
        lbname = new javax.swing.JLabel();
        lbcompanyname = new javax.swing.JLabel();
        lbage = new javax.swing.JLabel();
        lbsex = new javax.swing.JLabel();
        lbcmnd = new javax.swing.JLabel();
        lbaddress = new javax.swing.JLabel();
        lbemail = new javax.swing.JLabel();
        lbphone = new javax.swing.JLabel();
        
        txtloginname = new javax.swing.JTextField();
        txtloginname.setEnabled(false);
        txtname = new javax.swing.JTextField();
        txtname.setEnabled(false);
        ttcompanyname = new javax.swing.JTextField();
        ttcompanyname.setEnabled(false);
        txtage = new javax.swing.JTextField();
        txtage.setEnabled(false);
        txtsex = new javax.swing.JTextField();
        txtsex.setEnabled(false);
        txtcmnd = new javax.swing.JTextField();
        txtcmnd.setEnabled(false);
        txtaddress = new javax.swing.JTextField();
        txtaddress.setEnabled(false);
        txtemail = new javax.swing.JTextField();
        txtemail.setEnabled(false);	        
        txtphone = new javax.swing.JTextField();
        txtphone.setEnabled(false);	  
        
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        lbloginname.setText("LoginName");

        lbname.setText("Name");

        lbcompanyname.setText("Companyname");

        lbage.setText("Age");

        lbsex.setText("Sex");

        lbcmnd.setText("CMND");

        lbaddress.setText("Address");

        lbemail.setText("Email");

        lbphone.setText("Phone");
        
        Account  ac = new Account(null,true);
        
        txtloginname.setText(ac.getA1());
        txtname.setText(ac.getA2());
        ttcompanyname.setText(ac.getA3());
        txtage.setText(ac.getA4());
        txtcmnd.setText(ac.getA6());
        txtaddress.setText(ac.getA7());
        txtemail.setText(ac.getA9());
        txtsex.setText(ac.getA5());
        txtphone.setText(ac.getA8());
        
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbage)
                    .addComponent(lbsex)
                    .addComponent(lbcompanyname)
                    .addComponent(lbloginname)
                    .addComponent(lbname)
                    .addComponent(lbcmnd)
                    .addComponent(lbaddress)
                    .addComponent(lbemail)
                    .addComponent(lbphone))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtphone, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)
                    .addComponent(txtemail, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(txtaddress)
                        .addComponent(txtcmnd)
                        .addComponent(txtsex)
                        .addComponent(txtage)
                        .addComponent(ttcompanyname)
                        .addComponent(txtname)
                        .addComponent(txtloginname, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)))
                .addGap(87, 87, 87))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbloginname)
                    .addComponent(txtloginname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbname)
                    .addComponent(txtname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbcompanyname)
                    .addComponent(ttcompanyname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbage)
                    .addComponent(txtage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbsex)
                    .addComponent(txtsex, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbcmnd)
                    .addComponent(txtcmnd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbaddress)
                    .addComponent(txtaddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtphone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbphone))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lbemail)
                    .addComponent(txtemail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }

    public static void main(String args[]) {

        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(AccountView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(AccountView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(AccountView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(AccountView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                AccountView dialog = new AccountView(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    private javax.swing.JLabel lbaddress;
    private javax.swing.JLabel lbage;
    private javax.swing.JLabel lbcmnd;
    private javax.swing.JLabel lbcompanyname;
    private javax.swing.JLabel lbemail;
    private javax.swing.JLabel lbloginname;
    private javax.swing.JLabel lbname;
    private javax.swing.JLabel lbphone;
    private javax.swing.JLabel lbsex;
    private javax.swing.JTextField ttcompanyname;
    private javax.swing.JTextField txtaddress;
    private javax.swing.JTextField txtage;
    private javax.swing.JTextField txtcmnd;
    private javax.swing.JTextField txtemail;
    private javax.swing.JTextField txtloginname;
    private javax.swing.JTextField txtname;
    private javax.swing.JTextField txtphone;
    private javax.swing.JTextField txtsex;

}
